package com.example.springboot14.controller;


import com.example.springboot14.entity.User;
import com.example.springboot14.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
// localhost:9001/user/findAll
// localhost:9001/zg/user/findAll
// localhost:9000/zg/user/findAll
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService userService;
    @ RequestMapping("/findAll")
    public List<User> findAll(){
        return userService.findAll();
    }

}
